// pages/home/job/resume/train/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    experience: {
      start_year: 0,
      start_month: 0,
      end_year: 0,
      end_month: 0,
      end_today: 0,
      company_name: '',
      position: '',
      reason_for_leaving: ''
    },

    start: '',
    showStart: false,
    currentDate: new Date().getTime(),
    minDate: new Date(1970, 0, 1).getTime(),
    maxDate: new Date().getTime(),
  },

  sumbitTrain() {},

  openPopup(e) {
    let self = this;
    switch (e.currentTarget.dataset.name) {
      case 'start':
        self.setData({
          showStart: true
        })
        break;
    }
  },

  yearMonthConfirm(e) {

  },

  yearMonthCancel(e) {

  },

  companyNameBlur(e) {
    let self = this;
    self.setData({
      'experience.company_name': e.detail.value
    })
  },

  positionBlur(e) {
    let self = this;
    self.setData({
      'experience.position': e.detail.value
    })
  },

  reasonForLeavingBlur(e) {
    let self = this;
    self.setData({
      'experience.reason_for_leaving': e.detail.value
    })
  },


})